
// Copyright (C) 2015  Frode Roxrud Gill
// See LICENSE file for license

#include "font.h"

#include "xmega/utils/progmem.h"


static PROGMEM_DECLARE(U8, g_BMPlainFont7_alphabet_p[]) = " !\"#$%&'()*+,-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[]_abcdefghijklmnopqrstuvwxyz{}";

static PROGMEM_DECLARE(U8, g_BMPlainFont7_font_p[]) = {
CHAR_SIZE(4,0,0), //[SPACE]

CHAR_SIZE(1,5,1), //!
0b10000000,
0b10000000,
0b10000000,
0b00000000,
0b10000000,

CHAR_SIZE(3,2,0), //"
0b10100000,
0b10100000,

CHAR_SIZE(5,5,0), //#
0b01010000,
0b11111000,
0b01010000,
0b11111000,
0b01010000,

CHAR_SIZE(5,7,0), //$
0b00100000,
0b11111000,
0b10000000,
0b11111000,
0b00001000,
0b11111000,
0b00100000,

CHAR_SIZE(7,5,1), //%
0b11100100,
0b10101000,
0b11111110,
0b00101010,
0b01001110,

CHAR_SIZE(6,5,1), //&
0b11110000,
0b10000000,
0b11101100,
0b10001000,
0b11111000,

CHAR_SIZE(1,2,0), //'
0b10000000,
0b10000000,

CHAR_SIZE(2,5,1), //(
0b01000000,
0b10000000,
0b10000000,
0b10000000,
0b01000000,

CHAR_SIZE(2,5,1), //)
0b10000000,
0b01000000,
0b01000000,
0b01000000,
0b10000000,

CHAR_SIZE(5,5,0), //*
0b10001000,
0b01010000,
0b11111000,
0b01010000,
0b10001000,

CHAR_SIZE(5,5,1), //+
0b00100000,
0b00100000,
0b11111000,
0b00100000,
0b00100000,

CHAR_SIZE(1,2,5), //,
0b10000000,
0b10000000,

CHAR_SIZE(5,1,3), //-
0b11111000,

CHAR_SIZE(1,1,5), //.
0b10000000,

CHAR_SIZE(5,5,1), // /
0b00001000,
0b00010000,
0b00100000,
0b01000000,
0b10000000,

CHAR_SIZE(5,5,1), //0
0b11111000,
0b10001000,
0b10101000,
0b10001000,
0b11111000,

CHAR_SIZE(2,5,1), //1
0b01000000,
0b11000000,
0b01000000,
0b01000000,
0b01000000,

CHAR_SIZE(5,5,1), //2
0b11111000,
0b00001000,
0b11111000,
0b10000000,
0b11111000,

CHAR_SIZE(5,5,1), //3
0b11111000,
0b00001000,
0b11111000,
0b00001000,
0b11111000,

CHAR_SIZE(5,5,1), //4
0b10001000,
0b10001000,
0b11111000,
0b00001000,
0b00001000,

CHAR_SIZE(5,5,1), //5
0b11111000,
0b10000000,
0b11111000,
0b00001000,
0b11111000,

CHAR_SIZE(5,5,1), //6
0b11111000,
0b10000000,
0b11111000,
0b10001000,
0b11111000,

CHAR_SIZE(5,5,1), //7
0b11111000,
0b00001000,
0b00001000,
0b00001000,
0b00001000,

CHAR_SIZE(5,5,1), //8
0b11111000,
0b10001000,
0b11111000,
0b10001000,
0b11111000,

CHAR_SIZE(5,5,1), //9
0b11111000,
0b10001000,
0b11111000,
0b00001000,
0b11111000,

CHAR_SIZE(1,3,2), //:
0b10000000,
0b00000000,
0b10000000,

CHAR_SIZE(1,4,2), //;
0b10000000,
0b00000000,
0b10000000,
0b10000000,

CHAR_SIZE(3,5,1), //<
0b00100000,
0b01000000,
0b10000000,
0b01000000,
0b00100000,

CHAR_SIZE(5,3,2), //=
0b11111000,
0b00000000,
0b11111000,

CHAR_SIZE(3,5,1), //>
0b10000000,
0b01000000,
0b00100000,
0b01000000,
0b10000000,

CHAR_SIZE(5,5,1), //?
0b11111000,
0b10001000,
0b00111000,
0b00000000,
0b00100000,

CHAR_SIZE(5,5,1), //@
0b11111000,
0b10101000,
0b10111000,
0b10000000,
0b11111000,

CHAR_SIZE(5,5,1), //A
0b11111000,
0b10001000,
0b10001000,
0b11111000,
0b10001000,

CHAR_SIZE(5,5,1), //B
0b11111000,
0b10001000,
0b11110000,
0b10001000,
0b11111000,

CHAR_SIZE(5,5,1), //C
0b11111000,
0b10000000,
0b10000000,
0b10000000,
0b11111000,

CHAR_SIZE(5,5,1), //D
0b11110000,
0b10001000,
0b10001000,
0b10001000,
0b11110000,

CHAR_SIZE(5,5,1), //E
0b11111000,
0b10000000,
0b11110000,
0b10000000,
0b11111000,

CHAR_SIZE(5,5,1), //F
0b11111000,
0b10000000,
0b11110000,
0b10000000,
0b10000000,

CHAR_SIZE(5,5,1), //G
0b11111000,
0b10000000,
0b10111000,
0b10001000,
0b11111000,

CHAR_SIZE(5,5,1), //H
0b10001000,
0b10001000,
0b11111000,
0b10001000,
0b10001000,

CHAR_SIZE(3,5,1), //I
0b11100000,
0b01000000,
0b01000000,
0b01000000,
0b11100000,

CHAR_SIZE(5,5,1), //J
0b00001000,
0b00001000,
0b10001000,
0b10001000,
0b11111000,

CHAR_SIZE(5,5,1), //K
0b10001000,
0b10010000,
0b11100000,
0b10010000,
0b10001000,

CHAR_SIZE(5,5,1), //L
0b10000000,
0b10000000,
0b10000000,
0b10000000,
0b11111000,

CHAR_SIZE(5,5,1), //M
0b10001000,
0b11011000,
0b10101000,
0b10101000,
0b10101000,

CHAR_SIZE(5,5,1), //N
0b10001000,
0b11001000,
0b10101000,
0b10011000,
0b10001000,

CHAR_SIZE(5,5,1), //O
0b11111000,
0b10001000,
0b10001000,
0b10001000,
0b11111000,

CHAR_SIZE(5,5,1), //P
0b11111000,
0b10001000,
0b11111000,
0b10000000,
0b10000000,

CHAR_SIZE(5,6,1), //Q
0b11111000,
0b10001000,
0b10001000,
0b10101000,
0b11111000,
0b00100000,

CHAR_SIZE(5,5,1), //R
0b11111000,
0b10001000,
0b11111000,
0b10010000,
0b10001000,

CHAR_SIZE(5,5,1), //S
0b11111000,
0b10000000,
0b11111000,
0b00001000,
0b11111000,

CHAR_SIZE(5,5,1), //T
0b11111000,
0b00100000,
0b00100000,
0b00100000,
0b00100000,

CHAR_SIZE(5,5,1), //U
0b10001000,
0b10001000,
0b10001000,
0b10001000,
0b01110000,

CHAR_SIZE(5,5,1), //V
0b10001000,
0b10001000,
0b10001000,
0b01010000,
0b00100000,

CHAR_SIZE(5,5,1), //W
0b10101000,
0b10101000,
0b10101000,
0b11011000,
0b10001000,

CHAR_SIZE(5,5,1), //X
0b10001000,
0b01010000,
0b00100000,
0b01010000,
0b10001000,

CHAR_SIZE(5,5,1), //Y
0b10001000,
0b01010000,
0b00100000,
0b00100000,
0b00100000,

CHAR_SIZE(5,5,1), //Z
0b11111000,
0b00010000,
0b00100000,
0b01000000,
0b11111000,

CHAR_SIZE(2,5,1), //[
0b11000000,
0b10000000,
0b10000000,
0b10000000,
0b11000000,

CHAR_SIZE(2,5,1), //]
0b11000000,
0b01000000,
0b01000000,
0b01000000,
0b11000000,

CHAR_SIZE(5,1,5), //_
0b11111000,

CHAR_SIZE(6,4,2), //a
0b11111000,
0b10001000,
0b10001000,
0b11111100,

CHAR_SIZE(5,5,1), //b
0b10000000,
0b11111000,
0b10001000,
0b10001000,
0b11111000,

CHAR_SIZE(5,4,2), //c
0b11111000,
0b10000000,
0b10000000,
0b11111000,

CHAR_SIZE(5,5,1), //d
0b00001000,
0b11111000,
0b10001000,
0b10001000,
0b11111000,

CHAR_SIZE(5,4,2), //e
0b11111000,
0b11111000,
0b10000000,
0b11111000,

CHAR_SIZE(4,5,1), //f
0b01110000,
0b01000000,
0b11110000,
0b01000000,
0b01000000,

CHAR_SIZE(5,5,2), //g
0b11111000,
0b10001000,
0b11111000,
0b00001000,
0b01111000,

CHAR_SIZE(5,5,1), //h
0b10000000,
0b11111000,
0b10001000,
0b10001000,
0b10001000,

CHAR_SIZE(1,5,1), //i
0b10000000,
0b00000000,
0b10000000,
0b10000000,
0b10000000,

CHAR_SIZE(1,6,1), //j
0b10000000,
0b00000000,
0b10000000,
0b10000000,
0b10000000,
0b10000000,

CHAR_SIZE(3,5,1), //k
0b10000000,
0b10000000,
0b10100000,
0b11000000,
0b10100000,

CHAR_SIZE(2,5,1), //l
0b11000000,
0b01000000,
0b01000000,
0b01000000,
0b01000000,

CHAR_SIZE(5,4,2), //m
0b11111000,
0b10101000,
0b10101000,
0b10101000,

CHAR_SIZE(5,4,2), //n
0b11111000,
0b10001000,
0b10001000,
0b10001000,

CHAR_SIZE(5,4,2), //o
0b11111000,
0b10001000,
0b10001000,
0b11111000,

CHAR_SIZE(5,5,2), //p
0b11111000,
0b10001000,
0b10001000,
0b11111000,
0b10000000,

CHAR_SIZE(5,5,2), //q
0b11111000,
0b10001000,
0b10001000,
0b11111000,
0b00001000,

CHAR_SIZE(4,4,2), //r
0b11110000,
0b10000000,
0b10000000,
0b10000000,

CHAR_SIZE(4,4,2), //s
0b11110000,
0b01000000,
0b00100000,
0b11110000,

CHAR_SIZE(4,5,1), //t
0b01000000,
0b11110000,
0b01000000,
0b01000000,
0b01110000,

CHAR_SIZE(5,4,2), //u
0b10001000,
0b10001000,
0b10001000,
0b11111000,

CHAR_SIZE(5,4,2), //v
0b10001000,
0b10001000,
0b01010000,
0b00100000,

CHAR_SIZE(5,4,2), //w
0b10101000,
0b10101000,
0b10101000,
0b11111000,

CHAR_SIZE(5,4,2), //x
0b11011000,
0b00100000,
0b00100000,
0b11011000,

CHAR_SIZE(5,5,2), //y
0b10001000,
0b10001000,
0b11111000,
0b00001000,
0b01111000,

CHAR_SIZE(4,4,2), //z
0b11110000,
0b00100000,
0b01000000,
0b11110000,

CHAR_SIZE(3,5,1), //{
0b01100000,
0b01000000,
0b11000000,
0b01000000,
0b01100000,

CHAR_SIZE(3,5,1), //}
0b11000000,
0b01000000,
0b01100000,
0b01000000,
0b11000000
};

BMPlainFont7::BMPlainFont7()
: Font(7, 1, &g_BMPlainFont7_alphabet_p[0], &g_BMPlainFont7_font_p[0])
{
}

BMPlainFont7::~BMPlainFont7()
{
}
